<?php
       //创建进程对应的函数
       function test(swoole_process $worker)
       {
           echo "pid".$worker->pid."\n";
           sleep(3);
       }

       //创建进程
       $process = new swoole_process("test");
       $pid = $process->start();

       //等待结束
       $res = swoole_process::wait();
       print_r($res);
